//
// Created by jerry on 2024/6/5.
//

#ifndef DS_SORT_H
#define DS_SORT_H

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#if defined(WIN32)|| defined(WIN64)|| defined(WINNT)
#include <conio.h>
#include <Windows.h>
#endif

#define DEBUG
#define ORIGINAL

extern char buf[0x100];
#define EXCEPTION                          \
    do                                     \
    {                                      \
        scanf("%s", buf);                  \
        perror(buf);                       \
        perror(":无效输入，请再试一次\n"); \
    } while (0);
typedef struct
{
    int *r;
    int length;
} SqList;

typedef SqList HeapType;

void initList(SqList *list, int length);
void showList(SqList list);

void InsertSort(SqList list);
void SelectSort(SqList list);

void HeapSort(HeapType *h);

#endif //DS_SORT_H
